package com.xqt.controller;

import com.xqt.common.PcsResult;
import com.xqt.entity.User;
import com.xqt.entity.sys.SysMember;
import com.xqt.entity.sys.SysMenu;
import com.xqt.inters.service.sys.ISysMemberService;
import com.xqt.inters.service.sys.ISysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2017/3/13.
 */
@RestController
public class UserController {



    @Autowired
    ISysMemberService sysMemberService;

    @Autowired
    ISysMenuService sysMenuService;



    @RequestMapping(value = "/testdubbo")
    public PcsResult testdubbo(){
       User user= new User();
//       user=userServiceImpl.gerUser();
        PcsResult result=new PcsResult();
//        result.setData(user);
        return result;
    }

    @RequestMapping(value = "/testdubbo2")
    public PcsResult testdubbo2(){
        User user= new User();
        user.setName("tt");
        PcsResult result=new PcsResult();
        result.setData(user);
        return result;
    }

    @RequestMapping(value = "/testmenu")
    public SysMenu t1(){
         return sysMenuService.queryById("12130334-981b-40f1-b89d-a190902ad042");
    }

    @RequestMapping(value = "/testmember")
    public SysMember t2(){
       return  sysMemberService.queryByName("huage0099");
    }
}
